{#
This file is part of EC-CUBE

Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.

http://www.ec-cube.co.jp/

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}

{% extends '@admin/default_frame.twig' %}

{% set menus = ['store', 'plugin', 'plugin_handler'] %}

{% block title %}{{'admin.store.plugin_handler.828'|trans}}{% endblock %}
{% block sub_title %}{{'admin.store.plugin_handler.829'|trans}}{% endblock %}

{% block main %}


    {% if handlersPerEvent|length > 0 %}
        {% for event, handlersPerType in handlersPerEvent %}
            {% for type,handlers in handlersPerType %}
                <div class="row">
                    <div class="col-md-12">
                        <div class="box">
                            <div class="box-header with-arrow">
                                {{ event }} / {{ type }}
                            </div><!-- /.box-header -->
                            <div class="box-body">
                                <div class="table_list">
                                    <div class="table-responsive with-border">
                                        <table class="table table-striped">
                                            <thead>
                                            <tr>
                                                <th>{{'admin.store.plugin_handler.830'|trans}}</th>
                                                <th>{{'admin.store.plugin_handler.831'|trans}}</th>
                                                <th>{{'admin.store.plugin_handler.832'|trans}}</th>
                                                <th>{{'admin.store.plugin_handler.833'|trans}}</th>
                                            </tr>
                                            </thead>
                                            {% for handler in handlers %}
                                                <tbody>
                                                    <tr>
                                                        <td class="member_id">
                                                            {{ handler.plugin.name }}
                                                        </td>
                                                        <td class="member_name">
                                                            {{ handler.handler }}
                                                        </td>
                                                        <td class="member_name">
                                                            {{ handler.priority }}
                                                        </td>
                                                        <td class="icon_edit">
                                                            <div class="dropdown">
                                                                <a class="dropdown-toggle" data-toggle="dropdown"><svg class="cb cb-ellipsis-h"> <use xlink:href="#cb-ellipsis-h" /></svg></a>
                                                                <ul class="dropdown-menu dropdown-menu-right">
                                                                    {% if true != loop.first %}
                                                                        <a href="{{ url('admin_store_plugin_handler_up',   {'id': handler.id}) }}">上へ</a>
                                                                    {% endif %}
                                                                    {% if true != loop.last %}
                                                                        <a href="{{ url('admin_store_plugin_handler_down', {'id': handler.id}) }}">{{'admin.store.plugin_handler.835'|trans}}</a>
                                                                    {% endif %}
                                                                </ul>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            {% endfor %}
                                        </table>
                                    </div>
                                </div>
                            </div><!-- /.box-body -->
                        </div>
                        <!-- /.box -->
                    </div>
                    <!-- /.col -->
                </div>
            {% endfor %}
        {% endfor %}
    {% else %}
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-arrow">
                        {{'admin.store.plugin_handler.836'|trans}}
                    </div><!-- /.box-header -->
                    <div class="box-header with-arrow">
                        <h3 class="box-title">{{'admin.store.plugin_handler.837'|trans}}</h3>
                    </div><!-- /.box-header -->
                </div>
            </div>
        </div>
    {% endif %}
{% endblock %}

